home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / pvm34b3.zip / pvm34b3 / pvm3 / libfpvm / WIN32 / Pvmfmstat.c < prev    next >
C/C++ Source or Header  |  1997-07-22  |  765b  |  44 lines

  1.  
  2. /* $Id: Pvmfmstat.c,v 1.1 1997/06/27 16:27:45 pvmsrc Exp $ */
  3.  
  4. #ifdef WIN32
  5. #include "..\..\include\pvm3.h"
  6. #include "..\..\src\pvmwin.h"
  7. #else 
  8. #include "pvm3.h"
  9. #endif
  10.  
  11. #include "pvm_consts.h"
  12.  
  13. #ifdef __WATCOMC__
  14. #include "watforstr.h"
  15. void __fortran
  16. PVMFMSTAT (host_str, mstat)
  17. WatcomFortranStr* host_str;
  18. int *mstat;
  19. {
  20.    char* host_ptr = host_str->strP;
  21.    int   host_len = host_str->len;
  22. #else
  23. void __stdcall
  24. PVMFMSTAT (host_ptr,host_len, mstat)
  25. char * host_ptr; int host_len;
  26. int *mstat;
  27. {
  28. #endif
  29.  
  30.    char thost[MAX_HOST_NAME + 1];
  31.  
  32.    /*
  33.     * Copy the host name to make sure there's
  34.     * a NUL at the end.
  35.     */
  36.    if (ftocstr(thost, sizeof(thost), host_ptr, host_len)) {
  37.       *mstat = PvmBadParam;
  38.       return;
  39.    }
  40.  
  41.    *mstat = pvm_mstat(thost);
  42. }
  43.  
  44.